package org.aeon.gamechatnest.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;
import org.aeon.gamechatnest.validated.Add;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 黑名单
 *
 * @TableName blacklist
 */
@Data
@TableName("blacklist")
public class Blacklist implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 黑名单id
     */
    @Schema(description = "黑名单编号id", name = "blacklistId")
    @TableId
    @Null(groups = Add.class, message = "新增时blacklistId应该为空")
    private Long blacklistId;
    /**
     * 发起用户
     */
    @Schema(description = "当前用户", name = "fromUser")
    @Null(groups = Add.class, message = "新增时fromUser应该为空")
    private Long fromUser;
    /**
     * 目标用户
     */
    @Schema(description = "目标用户", name = "toUser")
    @NotNull(groups = Add.class, message = "新增时toUser不能为空")
    private Long toUser;
    /**
     * 创建时间
     */
    @Schema(description = "创建时间", name = "createTime")
    @Null(groups = Add.class, message = "新增时blacklistId应该为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
